-- GENERATED SPELL FOR [Deadwood Avenger] --


function spell0_7157(pUnit, Event) --@Curse of the Deadwood,Heal--
pUnit:FullCastSpellOnTarget(13583,pUnit)
pUnit:RegisterEvent('Sorts_7157', 2000, 1)
end

function spell1_7157(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_7157', 605, 1)
end

function Sorts_7157(pUnit, Event)
local choix_sorts_7157 = math.random(0, 1)
if choix_sorts_7157 == 0 then
pUnit:RegisterEvent('spell0_7157', 1, 1)
end
if choix_sorts_7157 == 1 then
pUnit:RegisterEvent('spell1_7157', 1, 1)
end
end

function mob7157_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7157', math.random(1500, 3000), 1)
end

function mob7157_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7157_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7157_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7157, 1, 'mob7157_Action')
RegisterUnitEvent(7157, 2, 'mob7157_Leave')
RegisterUnitEvent(7157, 3, 'mob7157_Kill')
RegisterUnitEvent(7157, 4, 'mob7157_Die')
